package com.silverbox.waimai.service.order.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.silverbox.waimai.entity.WaimaiItem;
import com.silverbox.waimai.mapper.WaimaiItemMapper;
import com.silverbox.waimai.service.order.WaimaiItemService;

@Service
public class WaimaiItemServiceImpl implements WaimaiItemService {

	@Autowired
	private WaimaiItemMapper waimaiItemMapper;

	@Override
	public void addWaimaiItem(WaimaiItem item) {
		waimaiItemMapper.insert(item);
	}

	@Override
	public void addWaimaiItemForAddFish(WaimaiItem item) {
		waimaiItemMapper.addWaimaiItemForAddFish(item);
	}

	@Override
	public List<WaimaiItem> getWaimaiItemList(Long waimaiId) {
		return waimaiItemMapper.getWaimaiItemList(waimaiId);
	}

    @Override
    public void updateWaimaiItem(WaimaiItem item) {
        waimaiItemMapper.updateByPrimaryKey(item);
    }
}
